package com.gperp.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.gperp.common.TimeResult;
import com.gperp.pojo.Result;
import com.gperp.service.BaobiaoService;

@Controller
public class BaobiaoController {

	@Autowired
	private BaobiaoService baobiaoService;
	
	@RequestMapping(value="getdailishangyue",method=RequestMethod.POST)
	@CrossOrigin
	@ResponseBody
	public Result getdailishangyue(Integer page,Integer rows){
		return baobiaoService.getdailishangyuebaobiao(page,rows);
	}
	
	@RequestMapping(value="getyufukuanbaobiao",method=RequestMethod.POST)
	@CrossOrigin
	@ResponseBody
	public Result getyufukuanbaobiao(Integer page,Integer rows,TimeResult condition){
		return baobiaoService.yufukuan(page, rows, condition);
	}
	@RequestMapping(value="dailishangliushui",method=RequestMethod.POST)
	@CrossOrigin
	@ResponseBody
	public Result getdailishangliushui(Integer page,Integer rows,TimeResult condition){
		return baobiaoService.dailishangliushui(page, rows, condition);
	}
	@RequestMapping(value="getchanpinfenlei",method=RequestMethod.POST)
	@CrossOrigin
	@ResponseBody
	public Result getchanpinfenlei(Integer page,Integer rows){
		return baobiaoService.getchanpinfenlei(page, rows);
	}
	@RequestMapping(value="getkehubaobiao",method=RequestMethod.POST)
	@CrossOrigin
	@ResponseBody
	public Result getkehubaobiao(Integer page,Integer rows){
		return baobiaoService.getkehubaobiao(page, rows);
	}
}
